{extend name="public/common"}

{block name="style"}
<title>点对点教育VIP学员_信息录入</title>
<link rel="stylesheet" href="__HOME__/css/mui/mui.min.css">
<link rel="stylesheet" href="__HOME__/css/test/mui.picker.min.css">
<link rel="stylesheet" href="__HOME__/css/test/school.css">
<style>
    .top {
        width: 100%;
        height: 50px;
        font-size: 28px;
        color: #64a052;
        line-height: 50px;
        text-align: center;
    }
    .top img {
        width: 30px;
        margin-top: 10px;
    }
    .save{
        margin-top:30vw;
    }
    .sweet-alert h2 {
        color: #847d7d8f;
        font-size: 27px;
    }
    .list ul li {
        border-bottom: 1px solid #f1f1f1;
        font-size: 1.6rem;
        padding: 3vw 1.2vw 1vw 1.2vw;
        overflow: hidden;
        vertical-align: middle;
    }
    .mui-table-view-cell>a:not(.mui-btn) {
        font-size: 1.36rem;
        margin: 2vw;
        text-align: center;
        white-space: pre-wrap;
    }
    .mui-popover .mui-table-view{
        text-align: center;
    }
    #popover {
        height: 300px;
    }
    #popover1 {
        height: 300px;
    }
    #popover2 {
        height: 300px;
    }
    #popover3 {
        height: 300px;
    }
    #popover4 {
        height: 300px;
    }
    #popover5 {
        height: 100px;
    }
    #popover6 {
        height: 300px;
    }
    #popover7 {
        height: 300px;
    }
    #popover8 {
        height: 300px;
    }
    #popover9 {
        height: 300px;
    }
    #popover10 {
        height: 300px;
    }
    #popover11 {
        height: 300px;
    }
    #popover12 {
        height: 300px;
    }
    #popover20 {
        height: 300px;
    }
    #popover21 {
        height: 300px;
    }
    #popover22 {
        height: 300px;
    }
    #popover23 {
        height: 300px;
    }
    #openPopover {
        color: #333;
        font-size: 1.5rem;
        width: 80%;
        float: right;
        text-align: left;
    }
    #openPopover1 {
        color: #333;
        font-size: 1.5rem;
        width: 75%;
        float: right;
        text-align: left;
    }
    #openPopover2 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover3 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover4 {
        color: #333;
        font-size: 1.3rem;
        width: 70%;
        float: right;
        text-align: left;
        white-space: nowrap;
        overflow:hidden;
        text-overflow: ellipsis;
    }
    #openPopover5 {
        color: #333;
        font-size: 1.5rem;
        width: 75%;
        float: right;
        text-align: left;
    }
    #openPopover6 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover7 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover8 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover9 {
        color: #333;
        font-size: 1.3rem;
        width: 70%;
        float: right;
        text-align: left;
        white-space: nowrap;
        overflow:hidden;
        text-overflow: ellipsis;
    }
    #openPopover10 {
        color: #333;
        font-size: 1.3rem;
        width: 70%;
        float: right;
        text-align: left;
        white-space: nowrap;
        overflow:hidden;
        text-overflow: ellipsis;
    }
    #openPopover11 {
        color: #333;
        font-size: 1.3rem;
        width: 70%;
        float: right;
        text-align: left;
        white-space: nowrap;
        overflow:hidden;
        text-overflow: ellipsis;
    }
    #openPopover20 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover21 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover22 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover23 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
    }
    #openPopover12 {
        color: #333;
        font-size: 1.5rem;
        width: 70%;
        float: right;
        text-align: left;
        white-space: nowrap;
        overflow:hidden;
        text-overflow: ellipsis;
    }
    .list ul li input[type="text"],input[type="number"] {
        border: none;
        margin-bottom: 0;
        width: 65%;
        text-align: left;
        right: 0;
        padding: 0;
        -webkit-user-select: text;
        -user-select: text;
    }
    .mui-table-view-cell {
        position: relative;
        overflow: hidden;
        padding: 1px 15px;
        -webkit-touch-callout: none;
    }
    .a{
        -webkit-appearance: checkbox;
        display: inline-block;
        width:5.5vw;
        height:5.5vw;
    }

</style>
{/block}

{block name="body"}
<div class="top">
    <img src="__HOME__/images/sign/pen.png">
    学员信息录入
</div>
<div class="main">
    <div class="list">
        <ul>
            <li class="type1 address">
                <span style="color: red">* </span>分校：
                <a id="openPopover" href="#popover" data-id=""><p>{$info.fx}</p></a>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>班主任：
                <a id="openPopover1" href="#popover1" data-id=""><p>{$info.bzr}</p></a>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>考试年份：
                <a id="openPopover2" href="#popover2" data-id=""><p>{$info.ksnf}</p></a>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>报班项目：
                <a id="openPopover3" href="#popover3" data-id=""><p>{$info.bbxm}</p></a>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>报班类型：
                <a id="openPopover4" href="#popover4" data-id=""><p>{$info.bblx}</p></a>
            </li>
            <li class="type1 time">
                <span style="color: red">* </span>报名时间：
                <input type="text" style="font-size: 15px" placeholder="请输入报名时间" name="time" value="{$info.time|time_format='Y年m月d日 H:i'}" id="date" readonly>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>性别：
                <a id="openPopover5" href="#popover5" data-id=""><p>{$info.xb}</p></a>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>入学年份：
                <a id="openPopover6" href="#popover6" data-id=""><p>{$info.rxnf}</p></a>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>所属院校：
                <a id="openPopover8" href="#popover8" data-id="12"><p>浙江 A区</p></a>
            </li>
            <li class="type1 address">
                <a id="openPopover9" href="#popover9" data-id="439"><p>杭州电子科技大学</p></a>
            </li>
            <li class="type1 address">
                <a id="openPopover10" href="#popover10" data-id="电子信息学院"><p>电子信息学院</p></a>
            </li>
            <li class="type1 address">
                <a id="openPopover11" href="#popover11" data-id="3465"><p>集成电路设计与集成系统</p></a>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>目标院校：
                <a id="openPopover20" href="#popover20" data-id="12"><p>浙江 A区</p></a>
            </li>
            <li class="type1 address">
                <a id="openPopover21" href="#popover21" data-id="439"><p>杭州电子科技大学</p></a>
            </li>
            <li class="type1 address">
                <a id="openPopover22" href="#popover22" data-id="电子信息学院"><p>电子信息学院</p></a>
            </li>
            <li class="type1 address">
                <a id="openPopover23" href="#popover23" data-id="3465"><p>集成电路设计与集成系统</p></a>
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>应收金额（元）：
                <input type="number" placeholder="请输入应收金额" name="money" value="{$info.money}" style="width: 50%">
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>VIP编号：
                <input type="text" placeholder="请输入VIP编号" name="vip" value="{$info.vip}">
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>姓名：
                <input type="text" placeholder="请输入姓名" name="name" value="{$info.name}">
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>电话：
                <input type="number" placeholder="请输入电话" name="tel" value="{$info.tel}" style="width: 75%">
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>QQ：
                <input type="number" placeholder="请输入QQ" name="qq" value="{$info.qq}" style="width: 75%">
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>家长姓名：
                <input type="text" placeholder="请输入家长姓名" name="old" value="{$info.jzxm}" style="width: 65%">
            </li>
            <li class="type1 address">
                <span style="color: red">* </span>家长电话：
                <input type="number" placeholder="请输入家长电话" name="oldtel" value="{$info.jzdh}" style="width: 65%">
            </li>
            <li class="type1 address">
                <span style="margin-left: 2vw"></span>四级笔试成绩：
                <input type="number" placeholder="请输入笔试成绩" name="write_f" value="{$info.sjbs}" style="width: 57%">
            </li>
            <li class="type1 address">
                <span style="margin-left: 2vw"></span>四级口语成绩：
                <input type="number" placeholder="请输入口语成绩" name="say_f" value="{$info.sjky}" style="width: 57%">
            </li>
            <li class="type1 address">
                <span style="margin-left: 2vw"></span>六级笔试成绩：
                <input type="number" placeholder="请输入笔试成绩" name="write_s" value="{$info.ljbs}" style="width: 57%">
            </li>
            <li class="type1 address">
                <span style="margin-left: 2vw"></span>六级口语成绩：
                <input type="number" placeholder="请输入口语成绩" name="say_s" value="{$info.ljky}" style="width: 57%">
            </li>
            <li class="type1 address">
                <span style="margin-left: 2vw"></span>国家计算机等级考试：
                <input type="text" placeholder="请输入计算机成绩" name="comp" value="{$info.jsj}" style="width: 41%">
            </li>
            <li class="type1 address">
                <span style="margin-left: 2vw"></span>QQ群：
                <a id="openPopover7" href="#popover7" data-id="1"><p>考研</p></a>
            </li>
            <li class="qq" style="height: 50vw;padding: 0 2vw;">
                <span>
                    考研同年级VIP学员群
                    <input type="checkbox" value="考研同年级VIP学员群" name="words" class="a">、
                </span>
                <span>
                    英语VIP精听精翻群
                    <input type="checkbox" value="英语VIP精听精翻群" name="words" class="a">、
                </span>
                <span >
                    数学答疑群
                    <input type="checkbox" value="数学答疑群" name="words"  class="a">、
                </span>
                <span  >
                    点对点政治群
                  <input type="checkbox" value="点对点政治群" name="words" class="a">、
               </span>
                <span >
                    VIP论文群
                    <input type="checkbox" value="VIP论文群" name="words" class="a">、
                </span>
                <span >
                    431金融学综合
                    <input type="checkbox" value="431金融学综合" name="words" class="a">、
                </span>
                <span >
                    199/396VIP学员群
                    <input type="checkbox" value="199/396VIP学员群" name="words" class="a">、
                </span>
                <span >
                    西方经济学VIP学员群
                    <input type="checkbox" value="西方经济学VIP学员群" name="words" class="a">、
                </span>
                <span >
                    法硕VIP群
                    <input type="checkbox" value="法硕VIP群" name="words" class="a">、
                </span>
                 <span >
                     分校学员群
                    <input type="checkbox" value="分校学员群" name="words" class="a">
                </span>
            </li>
            <li style="height: 68vw;padding: 2vw 2vw 0 2vw;">
                <span style="color: red">* </span>学习计划：
                <div>
                    <textarea style="font-size: 1.5rem" placeholder="请输入学习计划..." name="study" rows="7">{$info.study}</textarea>
                </div>
            </li>
            <li class="type1 address" >
                <span style="color: red">* </span>抄送给：
                <a id="openPopover12" href="#popover12" data-id="{$info.teacherid}"><p>{$info.teacher}</p></a>
            </li>
        </ul>
    </div>
    <div class="save">提&emsp;交</div>
</div>
<div id="popover" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="list" id="de"}
                <li class="mui-table-view-cell" data-id="{$de.num}" data-tab="{$i}"><a>{$de.name}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover1" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="name" id="de"}
                <li class="mui-table-view-cell" data-id="{$de.id}" data-tab="{$i}"><a>{$de.name}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover2" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="year" id="de"}
                <li class="mui-table-view-cell" data-id="{$de}" data-tab="{$i}"><a>{$de}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover3" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="pro" id="de"}
                <li class="mui-table-view-cell" data-id="{$de.xm}" data-tab="{$i}"><a>{$de.xm}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover4" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="ban" id="bb"}
                <li class="mui-table-view-cell" data-id="{$bb.id}" data-tab="{$i}"><a>{$bb.banxing}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover5" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                <li class="mui-table-view-cell" data-id="1" data-tab="0"><a>男</a></li>
                <li class="mui-table-view-cell" data-id="2" data-tab="1"><a>女</a></li>
            </ul>
        </div>
    </div>
</div>
<div id="popover6" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="sch" id="de"}
                <li class="mui-table-view-cell" data-id="{$de}" data-tab="{$i}"><a>{$de}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover7" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                <li class="mui-table-view-cell" data-id="1" data-tab="0"><a>考研</a></li>
                <li class="mui-table-view-cell" data-id="2" data-tab="1"><a>专升本</a></li>
                <li class="mui-table-view-cell" data-id="3" data-tab="2"><a>口译</a></li>
                <li class="mui-table-view-cell" data-id="4" data-tab="3"><a>雅思</a></li>
                <li class="mui-table-view-cell" data-id="5" data-tab="4"><a>计算机</a></li>
                <li class="mui-table-view-cell" data-id="6" data-tab="5"><a>论文</a></li>
            </ul>
        </div>
    </div>
</div>
<div id="popover8" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="area" id="ar"}
                <li class="mui-table-view-cell" data-id="{$ar.dq_id}" data-tab="{$i}"><a>{$ar.diqu} {$ar.qu}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover20" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="area" id="ar"}
                <li class="mui-table-view-cell" data-id="{$ar.dq_id}" data-tab="{$i}"><a>{$ar.diqu} {$ar.qu}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover9" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="school" id="sch"}
                <li class="mui-table-view-cell" data-id="{$sch.dx_id}" data-tab="{$i}"><a>{$sch.dx}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover21" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="school" id="sch"}
                <li class="mui-table-view-cell" data-id="{$sch.dx_id}" data-tab="{$i}"><a>{$sch.dx}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover10" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="home" id="h"}
                <li class="mui-table-view-cell" data-id="{$h.xy}" data-tab="{$i}"><a>{$h.xy}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover22" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="home" id="h"}
                <li class="mui-table-view-cell" data-id="{$h.xy}" data-tab="{$i}"><a>{$h.xy}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover11" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="zy" id="z"}
                <li class="mui-table-view-cell" data-id="{$z.id}" data-tab="{$i}"><a>{$z.zy}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover23" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="zy" id="z"}
                <li class="mui-table-view-cell" data-id="{$z.id}" data-tab="{$i}"><a>{$z.zy}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div id="popover12" class="mui-popover" >
    <div class="mui-scroll-wrapper">
        <div class="mui-scroll">
            <ul class="mui-table-view">
                {volist name="teacher" id="tt"}
                <li class="mui-table-view-cell" data-id="{$tt.openid}" data-tab="{$i}"><a>{$tt.name}</a></li>
                {/volist}
            </ul>
        </div>
    </div>
</div>
<div class="showbox">
    <div class="loader">
        <svg class="circular" viewBox="25 25 50 50">
            <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>
        </svg>
    </div>
</div>
{/block}

{block name="script"}
<script src="__HOME__/js/reset.js"></script>
<script src="__HOME__/js/mui.min.js"></script>
<script src="__HOME__/js/mui.picker.min.js"></script>
<script src="__HOME__/js/jquery-1.12.1.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    $('title' ).text('点对点教育VIP学员_信息录入');
    mui('.mui-scroll-wrapper').scroll();

    $(".showbox").hide();
    //关闭分享
    function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
    }
    if (typeof WeixinJSBridge == "undefined") {
        if (document.addEventListener) {
            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
        } else if (document.attachEvent) {
            document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
        }
    } else {
        onBridgeReady();
    }
    $("#popover ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover").attr("data-id",id);
        mui('#popover').popover("hide");
    });
    $("#popover1 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover1").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover1").attr("data-id",id);
        mui('#popover1').popover("hide");
    });
    $("#popover2 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover2").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover2").attr("data-id",id);
        mui('#popover2').popover("hide");
    });
    $("#popover3 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover3").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover3").attr("data-id",id);
        mui('#popover3').popover("hide");
        $.ajax({
            type:"post",
            url: "{:Url('School/sel')}",
            data:{id:id},
            beforeSend: function(XMLHttpRequest){
                $("#openPopover4").html('请选择');
                $("#openPopover4").attr("data-id",'');
                $("#popover4 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
            },
            success:function(data){
                var html = '';
                var len = data.length;
                for(var i = 0; i< len;i++){
                    var list = data[i];
                    if (list.fenlei){
                        html+='<li class="mui-table-view-cell" data-id="'+list.id+'" data-tab="'+i+'"><a>'+list.fenlei+'、'+list.banxing+'</a></li>';
                    }else{
                        html+='<li class="mui-table-view-cell" data-id="'+list.id+'" data-tab="'+i+'"><a>'+list.banxing+'</a></li>';
                    }
                }
                $("#popover4 ul" ).append(html);
                $("#popover4 ul li").click(function(){
                    var select_it = $(this).text();
                    $("#openPopover4").html(select_it);
                    var id = $(this).attr("data-id");
                    $("#openPopover4").attr("data-id",id);
                    mui('#popover4').popover("hide");
                });
            }
        });
    });
    $("#popover4 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover4").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover4").attr("data-id",id);
        mui('#popover4').popover("hide");
    });
    $("#popover5 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover5").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover5").attr("data-id",id);
        mui('#popover5').popover("hide");
    });
    $("#popover6 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover6").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover6").attr("data-id",id);
        mui('#popover6').popover("hide");
    });
    $("#popover7 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover7").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover7").attr("data-id",id);
        mui('#popover7').popover("hide");
        $(".qq span").each(function(){
            $(this).remove();
        });
        var html = '';
        if (id == 1){
            html+='<span>考研同年级VIP学员群 <input type="checkbox" value="考研同年级VIP学员群" name="words" class="a">、</span><span>英语VIP精听精翻群 <input type="checkbox" value="英语VIP精听精翻群" name="words" class="a">、</span><span >数学答疑群 <input type="checkbox" value="数学答疑群" name="words"  class="a">、</span><span  >点对点政治群 <input type="checkbox" value="点对点政治群" name="words" class="a">、</span><span >VIP论文群 <input type="checkbox" value="VIP论文群" name="words" class="a">、</span><span >431金融学综合 <input type="checkbox" value="431金融学综合" name="words" class="a">、</span><span >199/396VIP学员群 <input type="checkbox" value="199/396VIP学员群" name="words" class="a">、</span><span >西方经济学VIP学员群 <input type="checkbox" value="西方经济学VIP学员群" name="words" class="a">、</span><span >法硕VIP群 <input type="checkbox" value="法硕VIP群" name="words" class="a">、</span><span >分校学员群 <input type="checkbox" value="分校学员群" name="words" class="a"></span>';
        }else if(id == 2){
            html+='<span>专升本同年级VIP学员群 <input type="checkbox" value="专升本同年级VIP学员群" name="words" class="a">、</span><span>英语VIP精听群 <input type="checkbox" value="英语VIP精听群" name="words" class="a">、</span><span >数学答疑群 <input type="checkbox" value="数学答疑群" name="words"  class="a">、</span><span  >语文答疑群 <input type="checkbox" value="语文答疑群" name="words" class="a">、</span><span >分校学员群 <input type="checkbox" value="分校学员群" name="words" class="a"></span>';
        }else if(id == 3){
            html+='<span>口译学员总群 <input type="checkbox" value="口译学员总群" name="words" class="a">、</span><span>当期口译笔试群 <input type="checkbox" value="当期口译笔试群" name="words" class="a">、</span><span >当期口译口试群 <input type="checkbox" value="当期口译口试群" name="words"  class="a">、</span><span  >分校学员群 <input type="checkbox" value="分校学员群" name="words" class="a"></span>';
        }else if(id == 4){
            html+='<span>雅思学员总群 <input type="checkbox" value="雅思学员总群" name="words" class="a">、</span><span>分校学员群 <input type="checkbox" value="分校学员群" name="words" class="a"></span>';
        }else if(id == 5){
            html+='<span>计算机学员总群 <input type="checkbox" value="计算机学员总群" name="words" class="a">、</span><span>分校学员群 <input type="checkbox" value="分校学员群" name="words" class="a"></span>';
        }else if(id == 6){
            html+='<span>VIP学员群 <input type="checkbox" value="VIP学员群" name="words" class="a">、</span><span>论文准备微信群 <input type="checkbox" value="论文准备微信群" name="words" class="a">、</span><span>当期论文群 <input type="checkbox" value="当期论文群" name="words" class="a"></span>';
        }
        $(".qq" ).append(html);
    });
    $("#popover8 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover8").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover8").attr("data-id",id);
        mui('#popover8').popover("hide");
        $.ajax({
            type:"post",
            url: "{:Url('School/sele')}",
            data:{id:id},
            beforeSend: function(XMLHttpRequest){
                $("#openPopover9").html('请选择');
                $("#openPopover9").attr("data-id",'');
                $("#popover9 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
                $("#openPopover10").html('请选择');
                $("#openPopover10").attr("data-id",'');
                $("#popover10 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
                $("#openPopover11").html('请选择');
                $("#openPopover11").attr("data-id",'');
                $("#popover11 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
            },
            success:function(data){
                var html = '';
                var len = data.length;
                for(var i = 0; i< len;i++){
                    var list = data[i];
                    html+='<li class="mui-table-view-cell" data-id="'+list.dx_id+'" data-tab="'+i+'"><a>'+list.dx+'</a></li>';
                }
                $("#popover9 ul" ).append(html);
                $("#popover9 ul li").click(function(){
                    var select_it1 = $(this).text();
                    $("#openPopover9").html(select_it1);
                    var id1 = $(this).attr("data-id");
                    $("#openPopover9").attr("data-id",id1);
                    mui('#popover9').popover("hide");
                    $.ajax({
                        type:"post",
                        url: "{:Url('School/selec')}",
                        data:{id:id1},
                        beforeSend: function(XMLHttpRequest){
                            $("#openPopover10").html('请选择');
                            $("#openPopover10").attr("data-id",'');
                            $("#popover10 .mui-scroll ul li").each(function(){
                                $(this).remove();
                            });
                            $("#openPopover11").html('请选择');
                            $("#openPopover11").attr("data-id",'');
                            $("#popover11 .mui-scroll ul li").each(function(){
                                $(this).remove();
                            });
                        },
                        success:function(data){
                            var html = '';
                            var len = data.length;
                            for(var i = 0; i< len;i++){
                                var list = data[i];
                                html+='<li class="mui-table-view-cell" data-id="'+list.xy+'" data-tab="'+i+'"><a>'+list.xy+'</a></li>';
                            }
                            $("#popover10 ul" ).append(html);
                            $("#popover10 ul li").click(function(){
                                var select_it2 = $(this).text();
                                $("#openPopover10").html(select_it2);
                                var id2 = $(this).attr("data-id");
                                $("#openPopover10").attr("data-id",id2);
                                mui('#popover10').popover("hide");
                                $.ajax({
                                    type:"post",
                                    url: "{:Url('School/select')}",
                                    data:{id:id1,name:select_it2},
                                    beforeSend: function(XMLHttpRequest){
                                        $("#openPopover11").html('请选择');
                                        $("#openPopover11").attr("data-id",'');
                                        $("#popover11 .mui-scroll ul li").each(function(){
                                            $(this).remove();
                                        });
                                    },
                                    success:function(data){
                                        var html = '';
                                        var len = data.length;
                                        for(var i = 0; i< len;i++){
                                            var list = data[i];
                                            html+='<li class="mui-table-view-cell" data-id="'+list.id+'" data-tab="'+i+'"><a>'+list.zy+'</a></li>';
                                        }
                                        $("#popover11 ul" ).append(html);
                                        $("#popover11 ul li").click(function(){
                                            var select_it3 = $(this).text();
                                            $("#openPopover11").html(select_it3);
                                            var id3 = $(this).attr("data-id");
                                            $("#openPopover11").attr("data-id",id3);
                                            mui('#popover11').popover("hide");
                                        });
                                    }
                                });
                            });
                        }
                    });
                });
            }
        });
    });
    $("#popover20 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover20").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover20").attr("data-id",id);
        mui('#popover20').popover("hide");
        $.ajax({
            type:"post",
            url: "{:Url('School/sele')}",
            data:{id:id},
            beforeSend: function(XMLHttpRequest){
                $("#openPopover21").html('请选择');
                $("#openPopover21").attr("data-id",'');
                $("#popover21 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
                $("#openPopover22").html('请选择');
                $("#openPopover22").attr("data-id",'');
                $("#popover22 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
                $("#openPopover23").html('请选择');
                $("#openPopover23").attr("data-id",'');
                $("#popover23 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
            },
            success:function(data){
                var html = '';
                var len = data.length;
                for(var i = 0; i< len;i++){
                    var list = data[i];
                    html+='<li class="mui-table-view-cell" data-id="'+list.dx_id+'" data-tab="'+i+'"><a>'+list.dx+'</a></li>';
                }
                $("#popover21 ul" ).append(html);
                $("#popover21 ul li").click(function(){
                    var select_it1 = $(this).text();
                    $("#openPopover21").html(select_it1);
                    var id1 = $(this).attr("data-id");
                    $("#openPopover21").attr("data-id",id1);
                    mui('#popover21').popover("hide");
                    $.ajax({
                        type:"post",
                        url: "{:Url('School/selec')}",
                        data:{id:id1},
                        beforeSend: function(XMLHttpRequest){
                            $("#openPopover22").html('请选择');
                            $("#openPopover22").attr("data-id",'');
                            $("#popover22 .mui-scroll ul li").each(function(){
                                $(this).remove();
                            });
                            $("#openPopover23").html('请选择');
                            $("#openPopover23").attr("data-id",'');
                            $("#popover23 .mui-scroll ul li").each(function(){
                                $(this).remove();
                            });
                        },
                        success:function(data){
                            var html = '';
                            var len = data.length;
                            for(var i = 0; i< len;i++){
                                var list = data[i];
                                html+='<li class="mui-table-view-cell" data-id="'+list.xy+'" data-tab="'+i+'"><a>'+list.xy+'</a></li>';
                            }
                            $("#popover22 ul" ).append(html);
                            $("#popover22 ul li").click(function(){
                                var select_it2 = $(this).text();
                                $("#openPopover22").html(select_it2);
                                var id2 = $(this).attr("data-id");
                                $("#openPopover22").attr("data-id",id2);
                                mui('#popover22').popover("hide");
                                $.ajax({
                                    type:"post",
                                    url: "{:Url('School/select')}",
                                    data:{id:id1,name:id2},
                                    beforeSend: function(XMLHttpRequest){
                                        $("#openPopover23").html('请选择');
                                        $("#openPopover23").attr("data-id",'');
                                        $("#popover23 .mui-scroll ul li").each(function(){
                                            $(this).remove();
                                        });
                                    },
                                    success:function(data){
                                        var html = '';
                                        var len = data.length;
                                        for(var i = 0; i< len;i++){
                                            var list = data[i];
                                            html+='<li class="mui-table-view-cell" data-id="'+list.id+'" data-tab="'+i+'"><a>'+list.zy+'</a></li>';
                                        }
                                        $("#popover23 ul" ).append(html);
                                        $("#popover23 ul li").click(function(){
                                            var select_it3 = $(this).text();
                                            $("#openPopover23").html(select_it3);
                                            var id3 = $(this).attr("data-id");
                                            $("#openPopover23").attr("data-id",id3);
                                            mui('#popover23').popover("hide");
                                        });
                                    }
                                });
                            });
                        }
                    });
                });
            }
        });
    });
    $("#popover9 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover9").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover9").attr("data-id",id);
        mui('#popover9').popover("hide");
        $.ajax({
            type:"post",
            url: "{:Url('School/selec')}",
            data:{id:id},
            beforeSend: function(XMLHttpRequest){
                $("#openPopover10").html('请选择');
                $("#openPopover10").attr("data-id",'');
                $("#popover10 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
                $("#openPopover11").html('请选择');
                $("#openPopover11").attr("data-id",'');
                $("#popover11 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
            },
            success:function(data){
                var html = '';
                var len = data.length;
                for(var i = 0; i< len;i++){
                    var list = data[i];
                    html+='<li class="mui-table-view-cell" data-id="'+list.xy+'" data-tab="'+i+'"><a>'+list.xy+'</a></li>';
                }
                $("#popover10 ul" ).append(html);
                $("#popover10 ul li").click(function(){
                    var select_it1 = $(this).text();
                    $("#openPopover10").html(select_it1);
                    var id1 = $(this).attr("data-id");
                    $("#openPopover10").attr("data-id",id1);
                    mui('#popover10').popover("hide");
                    $.ajax({
                        type:"post",
                        url: "{:Url('School/select')}",
                        data:{id:id,name:select_it1},
                        beforeSend: function(XMLHttpRequest){
                            $("#openPopover11").html('请选择');
                            $("#openPopover11").attr("data-id",'');
                            $("#popover11 .mui-scroll ul li").each(function(){
                                $(this).remove();
                            });
                        },
                        success:function(data){
                            var html = '';
                            var len = data.length;
                            for(var i = 0; i< len;i++){
                                var list = data[i];
                                html+='<li class="mui-table-view-cell" data-id="'+list.id+'" data-tab="'+i+'"><a>'+list.zy+'</a></li>';
                            }
                            $("#popover11 ul" ).append(html);
                            $("#popover11 ul li").click(function(){
                                var select_it = $(this).text();
                                $("#openPopover11").html(select_it);
                                var id = $(this).attr("data-id");
                                $("#openPopover11").attr("data-id",id);
                                mui('#popover11').popover("hide");
                            });
                        }
                    });
                });
            }
        });
    });
    $("#popover21 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover21").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover21").attr("data-id",id);
        mui('#popover21').popover("hide");
        $.ajax({
            type:"post",
            url: "{:Url('School/selec')}",
            data:{id:id},
            beforeSend: function(XMLHttpRequest){
                $("#openPopover22").html('请选择');
                $("#openPopover22").attr("data-id",'');
                $("#popover22 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
                $("#openPopover23").html('请选择');
                $("#openPopover23").attr("data-id",'');
                $("#popover23 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
            },
            success:function(data){
                var html = '';
                var len = data.length;
                for(var i = 0; i< len;i++){
                    var list = data[i];
                    html+='<li class="mui-table-view-cell" data-id="'+list.xy+'" data-tab="'+i+'"><a>'+list.xy+'</a></li>';
                }
                $("#popover22 ul" ).append(html);
                $("#popover22 ul li").click(function(){
                    var select_it1 = $(this).text();
                    $("#openPopover22").html(select_it1);
                    var id1 = $(this).attr("data-id");
                    $("#openPopover22").attr("data-id",id1);
                    mui('#popover22').popover("hide");
                    $.ajax({
                        type:"post",
                        url: "{:Url('School/select')}",
                        data:{id:id,name:select_it1},
                        beforeSend: function(XMLHttpRequest){
                            $("#openPopover23").html('请选择');
                            $("#openPopover23").attr("data-id",'');
                            $("#popover23 .mui-scroll ul li").each(function(){
                                $(this).remove();
                            });
                        },
                        success:function(data){
                            var html = '';
                            var len = data.length;
                            for(var i = 0; i< len;i++){
                                var list = data[i];
                                html+='<li class="mui-table-view-cell" data-id="'+list.id+'" data-tab="'+i+'"><a>'+list.zy+'</a></li>';
                            }
                            $("#popover23 ul" ).append(html);
                            $("#popover23 ul li").click(function(){
                                var select_it = $(this).text();
                                $("#openPopover23").html(select_it);
                                var id = $(this).attr("data-id");
                                $("#openPopover23").attr("data-id",id);
                                mui('#popover23').popover("hide");
                            });
                        }
                    });
                });
            }
        });
    });
    $("#popover10 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover10").html(select_it);
        var name = $(this).attr("data-id");
        var id = $("#openPopover9").attr("data-id");
        $("#openPopover10").attr("data-id",id);
        mui('#popover10').popover("hide");
        $.ajax({
            type:"post",
            url: "{:Url('School/select')}",
            data:{id:id,name:name},
            beforeSend: function(XMLHttpRequest){
                $("#openPopover11").html('请选择');
                $("#openPopover11").attr("data-id",'');
                $("#popover11 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
            },
            success:function(data){
                var html = '';
                var len = data.length;
                for(var i = 0; i< len;i++){
                    var list = data[i];
                    html+='<li class="mui-table-view-cell" data-id="'+list.id+'" data-tab="'+i+'"><a>'+list.zy+'</a></li>';
                }
                $("#popover11 ul" ).append(html);
                $("#popover11 ul li").click(function(){
                    var select_it = $(this).text();
                    $("#openPopover11").html(select_it);
                    var id = $(this).attr("data-id");
                    $("#openPopover11").attr("data-id",id);
                    mui('#popover11').popover("hide");
                });
            }
        });
    });
    $("#popover22 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover22").html(select_it);
        var name = $(this).attr("data-id");
        var id = $("#openPopover22").attr("data-id");
        $("#openPopover22").attr("data-id",id);
        mui('#popover22').popover("hide");
        $.ajax({
            type:"post",
            url: "{:Url('School/select')}",
            data:{id:id,name:name},
            beforeSend: function(XMLHttpRequest){
                $("#openPopover23").html('请选择');
                $("#openPopover23").attr("data-id",'');
                $("#popover23 .mui-scroll ul li").each(function(){
                    $(this).remove();
                });
            },
            success:function(data){
                var html = '';
                var len = data.length;
                for(var i = 0; i< len;i++){
                    var list = data[i];
                    html+='<li class="mui-table-view-cell" data-id="'+list.id+'" data-tab="'+i+'"><a>'+list.zy+'</a></li>';
                }
                $("#popover23 ul" ).append(html);
                $("#popover23 ul li").click(function(){
                    var select_it = $(this).text();
                    $("#openPopover23").html(select_it);
                    var id = $(this).attr("data-id");
                    $("#openPopover23").attr("data-id",id);
                    mui('#popover23').popover("hide");
                });
            }
        });
    });
    $("#popover11 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover11").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover11").attr("data-id",id);
        mui('#popover11').popover("hide");
    });
    $("#popover23 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover23").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover23").attr("data-id",id);
        mui('#popover23').popover("hide");
    });
    $("#popover12 ul li").click(function(){
        var select_it = $(this).text();
        $("#openPopover12").html(select_it);
        var id = $(this).attr("data-id");
        $("#openPopover12").attr("data-id",id);
        mui('#popover12').popover("hide");
    });
    options = {
        scrollY: true, //是否竖向滚动
        scrollX: false, //是否横向滚动
        startX: 0, //初始化时滚动至x
        startY: 0, //初始化时滚动至y
        indicators: false, //是否显示滚动条
        deceleration:0.0006, //阻尼系数,系数越小滑动越灵敏
        bounce: true //是否启用回弹
    };

    mui('.mui-scroll-wrapper').scroll({
        deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
    });
    $(".save").on("click",function(){
        // checkbox
        var arr = []
        $.each($('input:checkbox:checked'),function(){
           arr.push($(this).val())
        });
        var fx = $("#openPopover").text();
        var bzr = $("#openPopover1").text();
        var ksnf = $("#openPopover2").text();
        var bbxm = $("#openPopover3").text();
        var bblx = $("#openPopover4").text();
        var time = $("input[name='time']").val();
        var xb = $("#openPopover5").text();
        var rxnf = $("#openPopover6").text();
        var xx_dq = $("#openPopover8").text();
        var xx_mc = $("#openPopover9").text();
        var xx_xy = $("#openPopover10").text();
        var xx_zy = $("#openPopover11").text();
        var mb_dq = $("#openPopover20").text();
        var mb_mc = $("#openPopover21").text();
        var mb_xy = $("#openPopover22").text();
        var mb_zy = $("#openPopover23").text();
        var money = $("input[name='money']").val();
        var vip = $("input[name='vip']").val();
        var name = $("input[name='name']").val();
        var tel = $("input[name='tel']").val();
        var qq = $("input[name='qq']").val();
        var jzxm = $("input[name='old']").val();
        var jzdh = $("input[name='oldtel']").val();
        var sjbs = $("input[name='write_f']").val();
        var sjky = $("input[name='say_f']").val();
        var ljbs = $("input[name='write_s']").val();
        var ljky = $("input[name='say_s']").val();
        var jsj = $("input[name='comp']").val();
        var qqq = $("#openPopover7").text();
        var qqqs = arr;
        var study = $("textarea[name='study']").val();
        var teacher = $("#openPopover12").text();
        var teacherid = $("#openPopover12").attr("data-id");
        if (bblx == '' || bblx == '请选择'){
            swal({
                title: ' ',
                text: '请输入报班类型',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (time == ''){
            swal({
                title: ' ',
                text: '请输入报名时间',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (money == ''){
            swal({
                title: ' ',
                text: '请输入应收金额',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (xx_mc == '' || mb_mc == '' || xx_mc == '请选择' || mb_mc == '请选择'){
            swal({
                title: ' ',
                text: '请输入学校',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (xx_xy == '' || mb_xy == '' || xx_xy == '请选择' || mb_xy == '请选择'){
            xx_xy = '';
            mb_xy = '';
        }
        if (xx_zy == '' || mb_zy == '' || xx_zy == '请选择' || mb_zy == '请选择'){
            xx_zy = '';
            mb_zy = ''
        }
        if (vip == ''){
            swal({
                title: ' ',
                text: '请输入VIP编号',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (name == ''){
            swal({
                title: ' ',
                text: '请输入姓名',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (tel == ''){
            swal({
                title: ' ',
                text: '请输入电话',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (qq == ''){
            swal({
                title: ' ',
                text: '请输入QQ',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (jzxm == ''){
            swal({
                title: ' ',
                text: '请输入家长姓名',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (jzdh == ''){
            swal({
                title: ' ',
                text: '请输入家长电话',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (study == ''){
            swal({
                title: ' ',
                text: '请输入学习计划',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if(arr.length == 0){
            swal({
                title: ' ',
                text: '请输入QQ群',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        if (teacherid == 0){
            swal({
                title: ' ',
                text: '请输入抄送老师',
                type: 'error',
                showConfirmButton:false,
                timer:1500
            });
            return false;
        }
        var data = {
            fx :fx,
            bzr : bzr,
            ksnf : ksnf,
            bbxm : bbxm,
            bblx : bblx,
            time : time,
            xb : xb,
            rxnf : rxnf,
            xx_dq : xx_dq,
            xx_mc : xx_mc,
            xx_xy : xx_xy,
            xx_zy : xx_zy,
            mb_dq : mb_dq,
            mb_mc : mb_mc,
            mb_xy : mb_xy,
            mb_zy : mb_zy,
            money : money,
            vip : vip,
            name : name,
            tel : tel,
            qq : qq,
            jzxm : jzxm,
            jzdh : jzdh,
            sjbs : sjbs,
            sjky : sjky,
            ljbs : ljbs,
            ljky : ljky,
            jsj : jsj,
            qqq : qqq,
            qqqs : qqqs,
            study : study,
            teacher : teacher,
            teacherid : teacherid
        };

        $.ajax({
            type:"post",
            url: "{:Url('School/save')}",
            data:data,
            beforeSend: function(XMLHttpRequest){
                $(".showbox").show();
            },
            success:function(data){
                $(".showbox").hide();
                if(data.code == 1){
                    swal({
                        title: "提交成功",
                        type: 'success',
                        showCancelButton: false,
                        confirmButtonText: "确定",
                        allowOutsideClick:false
                    });
                    setTimeout(function(){
                        var url ='http://mp.csppat.com/DDDeducation/public/index.php/home/school/index';
                        window.location.href=url;
                    },1500)
                }else{
                    swal({
                        title: ' ',
                        text: data.msg,
                        type: 'error',
                        showConfirmButton:false,
                        timer:1500
                    });
                }
            }
        });
    })

    var dtpicker = new mui.DtPicker({
        "type": "datetime",
        "value": ""
    });
    document.querySelector('#date').addEventListener('tap', function () {
        dtpicker.show(function (e) {
            document.getElementById('date').value = e.text;
        })
    })
</script>
{/block}